package com.vastcom.sigma.admin.model;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Member {
    private String memberid;
    private String name;
    private String pass;
    private String dept;
    private String rolegroup;
    private String state;
    private String realname;
    private String cell;

    @Id
    @Column(name = "memberid")
    public String getMemberid() {
        return memberid;
    }

    public void setMemberid(String memberid) {
        this.memberid = memberid;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "pass")
    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    @Basic
    @Column(name = "dept")
    public String getDept() {
        return dept;
    }

    public void setDept(String dept) {
        this.dept = dept;
    }

    @Basic
    @Column(name = "rolegroup")
    public String getRolegroup() {
        return rolegroup;
    }

    public void setRolegroup(String rolegroup) {
        this.rolegroup = rolegroup;
    }

    @Basic
    @Column(name = "state")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Basic
    @Column(name = "realname")
    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    @Basic
    @Column(name = "cell")
    public String getCell() {
        return cell;
    }

    public void setCell(String cell) {
        this.cell = cell;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Member member = (Member) o;

        if (memberid != null ? !memberid.equals(member.memberid) : member.memberid != null) return false;
        if (name != null ? !name.equals(member.name) : member.name != null) return false;
        if (pass != null ? !pass.equals(member.pass) : member.pass != null) return false;
        if (dept != null ? !dept.equals(member.dept) : member.dept != null) return false;
        if (rolegroup != null ? !rolegroup.equals(member.rolegroup) : member.rolegroup != null) return false;
        if (state != null ? !state.equals(member.state) : member.state != null) return false;
        if (realname != null ? !realname.equals(member.realname) : member.realname != null) return false;
        if (cell != null ? !cell.equals(member.cell) : member.cell != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = memberid != null ? memberid.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (pass != null ? pass.hashCode() : 0);
        result = 31 * result + (dept != null ? dept.hashCode() : 0);
        result = 31 * result + (rolegroup != null ? rolegroup.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        result = 31 * result + (realname != null ? realname.hashCode() : 0);
        result = 31 * result + (cell != null ? cell.hashCode() : 0);
        return result;
    }
}
